package cn.akwangl.spring.ioc.model;

import cn.akwangl.spring.ioc.annotation.Super;
import cn.akwangl.spring.ioc.enums.RoleLeve;
import org.springframework.core.io.Resource;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;

/**
 * 超级用户
 *
 * @author youyongkun
 * @date 2021/6/24 16:21
 */
@Super
public class SuperUser extends User implements Serializable {

    private RoleLeve role;

    private RoleLeve[] rootRole;

    private List<RoleLeve> listRootRole;

    private Resource configFileLocation;

    private Properties context;

    public RoleLeve getRole() {
        return role;
    }

    public void setRole(RoleLeve role) {
        this.role = role;
    }

    public RoleLeve[] getRootRole() {
        return rootRole;
    }

    public void setRootRole(RoleLeve[] rootRole) {
        this.rootRole = rootRole;
    }

    public List<RoleLeve> getListRootRole() {
        return listRootRole;
    }

    public void setListRootRole(List<RoleLeve> listRootRole) {
        this.listRootRole = listRootRole;
    }

    public Resource getConfigFileLocation() {
        return configFileLocation;
    }

    public void setConfigFileLocation(Resource configFileLocation) {
        this.configFileLocation = configFileLocation;
    }

    public Properties getContext() {
        return context;
    }

    public void setContext(Properties context) {
        this.context = context;
    }

    @Override
    public String toString() {
        return "SuperUser{" +
                "role=" + role +
                ", rootRole=" + Arrays.toString(rootRole) +
                ", listRootRole=" + listRootRole +
                ", configFileLocation=" + configFileLocation +
                ", context=" + context +
                '}';
    }
}
